package com.example.ribbon.controller;

import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/ribbon")
@AllArgsConstructor
public class RibbonController {

    private final RestTemplate restTemplate;

    @GetMapping
    public String ribbon(){
        return restTemplate.getForObject("http://eureka-customer/customer/eureka/consumer",String.class);

    }

}
